<style tyle="text/css">
    .modal-lg {
        width: 60%;
    }
</style>
<div class="modal-header">
  <h4 class="modal-title">产品信息</h4>
</div>
<div class="modal-body">
    <form name="form" class="form-horizontal form-validation ng-pristine ng-valid ng-valid-required">
        <div class="form-group">
            <h5 class="col-lg-4 control-label">产品名称【编号】</h5>
            <h5 class="col-sm-4 control-label text-left">{{bean.product_name}}【{{bean.product_code}}】</h5>
            <label class="control-label text-muted mt10"></label>
        </div>
        <div class="form-group">
            <h5 class="col-lg-4 control-label">景区名称【编号】</h5>
            <h5 class="col-sm-4 control-label text-left">{{bean.place_name}}【{{bean.place_code}}】</h5>
            <label class="control-label text-muted mt10"></label>
        </div>
        <div class="form-group">
            <h5 class="col-lg-4 control-label">产品状态</h5>
            <h5 class="col-sm-4 control-label text-left">{{bean.product_state == '1'? '上架': '下架'}}</h5>
            <label class="control-label text-muted mt10"></label>
        </div>
        <div class="form-group">
            <h5 class="col-lg-4 control-label">产品分类</h5>
            <h5 class="col-sm-4 control-label text-left">
                <span ng-if="bean.product_type == 'T'">门票</span>
                <span ng-if="bean.product_type == 'L'">游团</span>
                <span ng-if="bean.product_type == 'H'">酒店</span>
            </h5>
            <label class="control-label text-muted mt10"></label>
        </div>
        <div class="form-group">
            <h5 class="col-lg-4 control-label">价格类型</h5>
            <h5 class="col-sm-4 control-label text-left">
                <span ng-if="bean.product_price_type == '0'">有效期模式</span>
                <span ng-if="bean.product_price_type == '1'">价格日历模式</span>
            </h5>
            <label class="control-label text-muted mt10"></label>
        </div>
        <div class="form-group">
            <h5 class="col-lg-4 control-label">产品在商客销量</h5>
            <h5 class="col-sm-4 control-label text-left">{{bean.sale_num}}</h5>
            <label class="control-label text-muted mt10"></label>
        </div>
        <div class="form-group">
            <h5 class="col-lg-4 control-label">成本价</h5>
            <h5 class="col-sm-4 control-label text-left">￥{{bean.cost_price * 0.01}}</h5>
            <label class="control-label text-muted mt10"></label>
        </div>
        <div class="form-group">
            <h5 class="col-lg-4 control-label">平台价</h5>
            <h5 class="col-sm-4 control-label text-left">￥{{bean.guide_price * 0.01}}</h5>
            <label class="control-label text-muted mt10"></label>
        </div>
        <div class="form-group">
            <h5 class="col-lg-4 control-label">市场价</h5>
            <h5 class="col-sm-4 control-label text-left">￥{{bean.market_price * 0.01}}</h5>
            <label class="control-label text-muted mt10"></label>
        </div>
        <div class="form-group" ng-if="bean.guide_price == 0 || bean.cost_price == 0">
            <h5 class="col-lg-4 control-label">允许免费领取</h5>
            <h5 class="col-sm-4 control-label text-left">
                <label class="i-switch ml35">
                    <input type="checkbox" ng-model="isfree" ng-change="changefree(bean.product_code)"><i></i>
                </label>
            </h5>
            <label class="control-label text-muted mt10"></label>
        </div>
        <div class="form-group">
            <h5 class="col-lg-4 control-label">允许使用补贴最高金额</h5>
            <h5 class="col-sm-4 control-label text-left">
                <!-- <input type="number" class="form-control" ng-model="bean.nsubsidy_price" ng-disabled="bean.subsidy_allow != '1'" placeholder="允许使用补贴最高金额（元）"
                    min="0" /> -->
                ￥{{bean.nsubsidy_price}}
            </h5>
            <label class="control-label text-muted mt10"><i>允许使用补贴最高金额（元）</i></label>
        </div>
        <div class="form-group">
            <h5 class="col-lg-4 control-label">分润类型</h5>
            <h5 class="col-sm-4 control-label text-left">
                {{bean.profit_type == '0'? '使用后分润（产品可退）': '下单支付立即分润（产品不可退）'}}
            </h5>
            <label class="control-label text-muted mt10"></label>
        </div>
        <div class="form-group">
            <h4 class="col-lg-4 control-label">产品分润设置</h4>
            <h4 class="col-sm-6 control-label text-left">
              <label class="i-checks">
                <input type="radio" name="product_profit_set" value="default_shop" ng-model="bean.product_profit_set"> <i></i>店铺默认值
              </label>
              <label class="i-checks" style="margin-left: 20px">
                <input type="radio" name="product_profit_set" value="product_set" ng-model="bean.product_profit_set"> <i></i>产品设置
              </label>
            </h4>
            <label class="control-label text-muted mt10"></label>
        </div>
        <div class="form-group">
            <h4 class="col-lg-4 control-label">一级分润百分比</h4>
            <h4 class="col-sm-4">
                <input type="number" class="form-control" ng-show="bean.product_profit_set=='default_shop'" disabled ng-model="bean.shop_profit_level1">
                <input type="number" class="form-control" ng-show="bean.product_profit_set=='product_set'" 
                placeholder="例:20" ng-model="bean.profit_level1" min="0" max="100">
            </h4>
            <label class="control-label text-muted text-center">
                <span class="pull-left">百分号%前的部分。(下同)</span>
                <br />例：分润20%，输入框中填写20
            </label>
        </div>
        <div class="form-group">
            <h4 class="col-lg-4 control-label">二级分润百分比</h4>
            <h4 class="col-sm-4">
                <input type="number" class="form-control" ng-show="bean.product_profit_set=='default_shop'" disabled ng-model="bean.shop_profit_level2">
                <input type="number" class="form-control" ng-show="bean.product_profit_set=='product_set'" 
                placeholder="例:40" ng-model="bean.profit_level2" min="0" max="100">
            </h4>
            <label class="control-label text-muted mt10">
            </label>
        </div>
        <div class="form-group">
            <h4 class="col-lg-4 control-label">三级分润百分比</h4>
            <h4 class="col-sm-4">
                <input type="number" class="form-control" ng-show="bean.product_profit_set=='default_shop'" disabled ng-model="bean.shop_profit_level3">
                <input type="number" class="form-control" ng-show="bean.product_profit_set=='product_set'" 
                placeholder="例:40" ng-model="bean.profit_level3" min="0" max="100">
            </h4>
            <label class="control-label text-muted mt10">
                <i>游客直接购买那级</i>
            </label>
        </div>
        <div class="form-group">
            <h4 class="col-lg-4 control-label">商户让利</h4>
            <h4 class="col-sm-4">
                <input type="number" class="form-control" ng-show="bean.product_profit_set=='default_shop'" disabled ng-model="bean.shop_profit_percent">
                <input type="number" class="form-control" ng-show="bean.product_profit_set=='product_set'" 
                placeholder="例:10" ng-model="bean.profit_percent" min="0" max="100">
            </h4>
            <label class="control-label text-muted">
                <span class="pull-left">如:商户让利10%,利润为10元</span>
                <br />则三级分润为10 x 10% x 三级分润百分比
            </label>
        </div>

        <div class="form-group" >
          <h4 class="col-lg-4 control-label">标签:</h4>
            <h4  class="col-lg-4"> 
                <select class="form-control" ng-model="idssel">
                    <option value="">请选择一个标签</option>
                    <option ng-value="lab" ng-repeat="lab in labe">{{lab.label}}</option>
                </select>
            </h4>
            <h4 class="col-lg-1">
                <button class="btn btn-info" ng-click="add(idssel)">添加</button> 
            </h4>
        </div>
       
          <div class="form-group" style="margin:0 10% 0 10%;" ng-if="labe.length > 0">
              <div style="padding-right: 20px; padding-bottom: 5px; float: left;"  ng-repeat="la in label_list">
                  <button class="btn btn-sm btn-info">{{la.label}}
                    <i class="glyphicon glyphicon-remove" ng-click="remove($index)"></i>
                  </button>
                </div>
          </div>


        <!-- <div class="form-group">
            <h4 class="col-lg-4 control-label">
                返利红包
            </h4>
            <h4 class="col-sm-4">
                <input type="number" class="form-control" placeholder="返利红包" ng-model="info.redpackets_price" max="100">
            </h4>
            <label class="control-label text-muted mt10">
            </label>
        </div> -->
        <div class="form-group">
            <div class="form-group">
                <h4 class="col-lg-4 control-label">产品图片:</h4>
                <div class="col-lg-6">
                    <img ng-src="{{bean.product_image}}" width="300" height="200">
                </div>
            </div>
        </div>
        <div class="form-group">
          <h4 class="col-lg-4 control-label">分享描述语</h4>
          <h4 class="col-sm-4">
              <input type="text" class="form-control" placeholder="例:智慧旅游" ng-model="bean.description">
          </h4>
          <label class="control-label text-muted mt10"></label>
      </div>
        <div class="form-group" ng-if="bean.sale_type=='E'">
          <h4 class="col-lg-4 control-label">分润延迟时间</h4>
          <h4 class="col-sm-4">
              <div class="input-group m-b">
                  <input type="number" class="form-control" placeholder="7" ng-model="bean.delay_profit">
                  <span class="input-group-addon">天</span>
              </div>
          </h4>
          <label class="control-label text-muted mt10">实物产品确认收货后延迟分润的时间天数</label>
      </div>
    </form>
</div>

<div class="modal-footer">
  <button class="btn btn-success" type="button" ng-click="ok()">确定</button>
  <button class="btn btn-danger" type="button" ng-click="close()">关闭</button>
</div>